#!/usr/bin/env python3

from django.conf.urls import url
from . import views,menus 


# urlpatterns = [
#         url(r'^Myhome$', views.Myhome, name="Myhome"),
# ]
# # url 主菜单+小菜单 =>　use_userinfo
urlpatterns = []

urlpatterns = [
               url(r'^indextest$', views.index, name='indextest'),
               url(r'^login$', views.loginch, name='loginch'),
               url(r'^Myhome$', views.Myhome, name='Myhome'),
               url(r'^admin_list', views.admin_list, name='admin_list'),
               url(r'^admin_edit', views.admin_edit, name='admin_edit'),
               url(r'^quit$', views.quit, name='quit'),

            ]
for tab, subValue in menus.branchMenu.items():
    for sub_key in subValue:
        urlpatterns +=[url(r'^%s$' % sub_key, getattr(views, sub_key), name=tab +'_'+ sub_key)]

